package br.com.syshealth.clinica.entity;
import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;
import java.util.Timer;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name="agenda", schema="clinica")
public class Agenda implements Serializable {

	private static final long serialVersionUID = 1L;
	
		@Id
		@GeneratedValue(strategy = GenerationType.IDENTITY)
		@Column(name="id")
		private int id;
		
		@Temporal(TemporalType.DATE)		
		private Date data;
		
		@Column(name="hora_inicio")
		@Temporal(TemporalType.TIME)
		private Date hInicio;
		
		@Column(name="hora_fim")
		@Temporal(TemporalType.TIME)
		private Date hFinal;
		
		private boolean ativo;
		
		@ManyToOne
		@JoinColumn(name="id_medico")
		private Medico id_medico;
		
		@ManyToOne
		@JoinColumn(name="paciente")
		private Paciente paciente;
		
		public int getId(){
			return id;
		}
		public void setId(int id){
			this.id = id;
		}
		public Medico getMedico(){
			return id_medico;
		}
		public void setMedico(Medico medico){
			this.id_medico = medico;
		}
		public Date getData(){
			return data;
		}
		public void setData(Date data){
			this.data = data;
		}
		public Date getHInicio(){
			return hInicio;
		}
		public void setHInicio(Date hInicio){
			this.hInicio = hInicio;
		}
		public Date getHFinal(){
			return hFinal;
		}
		public void setHFinal(Date hFinal){
			this.hFinal = hFinal;
		}
		public boolean isAtivo() {
			return ativo;
		}
		public void setAtivo(boolean ativo) {
			this.ativo = ativo;
		}
		public Paciente getPaciente() {
			return paciente;
		}
		public void setPaciente(Paciente paciente) {
			this.paciente = paciente;
		}
}

